/*
 * @Description: 该文件描述
 * @FilePath: \fortune_h5\src\api\toolsService\index.ts
 * @Author: Brian Brian@gmail.com
 * @Date: 2024-10-29 18:10:09
 * @LastEditors: Brian Brian@gmail.com
 * @LastEditTime: 2024-10-30 09:23:57
 */
import { http } from "@/utils";

type FortuneByName_Params = {
  xing: string;
  ming: string;
  sex: string;
  year: number;
  month: number;
  day: number;
  hourstr: string;
};
type FortuneItems = {
  StrokeCount: number; //	笔画
  FiveElement: string; //	五行属性
  Comments: string[]; //	批语
};
type FortuneByName_Res = {
  MonthDizhi: string; //出生月份的地支
  MonthFiveElement: string; //出生月份的元素
  WordStrokeCounts: number[]; //	姓名每个字的笔画
  Words: string[]; //姓名对应的每个字，共4个
  Tian: FortuneItems; //天格
  Ren: FortuneItems; //人格
  Di: FortuneItems; //低格
  Wai: FortuneItems; //外格
  Zong: FortuneItems; //总格
};
export const FortuneByName = (
  params: FortuneByName_Params
): Promise<FortuneByName_Res> => {
  return http.post("/ToolsService/FortuneByName", Object.values(params));
};
